//
//  yxpAFNetWorking.m
//  TestProject
//
//  Created by 杨小平 on 14-8-22.
//  Copyright (c) 2014年 yangxiaoping. All rights reserved.
//

#import "yxpAFNetWorking.h"
#import "AFTESTClient.h"

#define SERVER_API @"http://112.124.104.241/api"

@interface yxpAFNetWorking ()

@end

@implementation yxpAFNetWorking

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
}
- (void)AFPostRequest
{
    NSString *urlString=[NSString stringWithFormat:@"%@/user/login/",SERVER_API];
    
    [[AFTESTClient sharedClient] postPath:urlString parameters:@{@"phone":@"12345678901",@"password":@"222222"} success:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSLog(@"%@",responseObject);
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"%@",error);
    }];
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
